package com.sunlands.zlcx.usercenter.client;

import com.alibaba.fastjson.JSONObject;
import com.sunlands.zlcx.usercenter.config.OauthFeignConfig;
import com.sunlands.zlcx.usercenter.vo.GroupGoalVO;
import com.sunlands.zlcx.usercenter.vo.feign.UsersGroupVO;
import com.sunlands.zlcx.usercenter.vo.response.BusinessResult;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "deskmate-group-api", configuration = OauthFeignConfig.class)
public interface GroupInfoService {

    /**
     * 根据用户id，查询群组信息
     * @param userId userId
     * @return JSONObject
     */
    @RequestMapping(value = "/group/simple")
    JSONObject getGroupInfoListByUserId(@RequestParam(value = "userId") Long userId, @RequestParam(value = "toUserId") Integer toUserId);


    /**
     * 根据用户id，根据组ID获取群主打卡群详细信息
     * @param userId userId
     * @return JSONObject
     */
    @GetMapping(value = "/group/punch-card-group/info")
    BusinessResult<List<GroupGoalVO>> punchCardGroup(@RequestParam(value = "userId") Long userId);

}
